package org.zjvis.datascience.common.dto.kg;

import cn.weiguangfu.swagger2.plus.annotation.ApiRequestExclude;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.zjvis.datascience.common.dto.BaseDTO;
import org.zjvis.datascience.common.util.DozerUtil;
import org.zjvis.datascience.common.vo.BaseVO;
import org.zjvis.datascience.common.vo.kg.DataPushVO;
import org.zjvis.datascience.common.vo.kg.KGPanelVO;

import java.time.LocalDateTime;

/**
 * @description 知识图谱面板VO
 * @date 2022-03-28
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public class KGPanelDTO extends BaseDTO {

    private Long id;

    private Long userId;

    private Long projectId;

    private Long vid;

    private String infoLayout;

    private String infoBasic;

    private String infoPublishLayout;

    private int cestatus; //collapse_expand status

    public KGPanelVO view() {
        KGPanelVO vo = DozerUtil.mapper(this, KGPanelVO.class);
        vo.setLayout(JSONObject.parseObject(this.getInfoLayout()));
        vo.setBasic(JSONObject.parseObject(this.getInfoBasic()));
        vo.setPublishLayout(JSONObject.parseObject(this.getInfoPublishLayout()));
        return vo;
    }
}
